package cn.kgc.crowdfundingadmin.controller;

import cn.kgc.crowdfundingadmin.pojo.Admin;
import cn.kgc.crowdfundingadmin.service.AdminService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @author shkstart
 * @create 2020-02-19 15:15
 */
@Controller
public class AdminController {
    @Resource
    AdminService adminService;

    @RequestMapping("/admin/get_by_id")
    @ResponseBody
    public Admin getByID(Integer id,Model model) {
        Admin admin = adminService.selectById(id);
       return admin;
    }
}
